﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using Models;
using LocalService;
using OnTheWay.Tool;

namespace PcBackgroundMgr
{
    /// <summary>
    /// App.xaml 的交互逻辑
    /// </summary>
    public partial class BlackMofoApp : Application
    {
        /// <summary>
        /// 全局APP
        /// </summary>
        public static BlackMofoApp App { get { return Application.Current as BlackMofoApp; } }
        /// <summary>
        /// 当前登录管理员
        /// </summary>
        public SysAdmin Admin { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public BlackMofoApp()
        {
            //LocalFactory.SetWebServiceUrl("http://222.85.149.6:2324/BlackMofoService.svc?wsdl");
            //LocalFactory.SetWebServiceUrl("http://127.0.0.1:2324/BlackMofoService.svc?wsdl");
        }
        /// <summary>
        /// 密码加密算法
        /// </summary>
        /// <param name="password"></param>
        /// <returns></returns>
        internal string EncryptionPassword(string password)
        {
            string key = "426C61636B4D6F666F";
            password = ValidateHelper.GetMD5Hash(key + password + key);
            password =  ValidateHelper.GetMD5Hash(key + password + key);
            return password;
        }
    }
}
